package com.main.usermanagement.domain.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.main.common.base.base.entity.BaseEntity;
import com.main.common.enums.Gender;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.boot.autoconfigure.domain.EntityScan;

import java.util.Date;

/**
 * @author Lin 2025/03/12
 * @version 1.0.0
 * 用户信息实体
 */
@TableName("user_info")
@EqualsAndHashCode(callSuper = true)
@Data
@EntityScan
public class UserInfo extends BaseEntity {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    @TableField(value = "user_id")
    private Long userId;
    @TableField(value = "birth_date")
    private Date birthDate;
    @TableField(value = "gender")
    private Gender gender;
    @TableField(value = "id_card")
    private String idCard;

    @TableField(exist = false)
    private UserAddress address;
}

